<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>失物招领</title>
    <link href="{{ asset('/static/vendor/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet">
    <link href="{{ asset('/static/vendor/bootstrap-select/css/bootstrap-select.min.css') }}" rel="stylesheet">
    <link href="{{ asset('/static/vendor/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css') }}"
          rel="stylesheet">
    <link href="{{ asset('/static/vendor/bootstrap-fileinput/css/fileinput.min.css') }}" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-inverse">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{{ url('/') }}">400-12345678</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav navbar-right">
                @if (Auth::guest())
                    <li><a href="{{ url('/account/login') }}">登陆</a></li>
                    <li><a href="{{ url('/account/register') }}">注册</a></li>
                @else
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                           aria-expanded="false">{{ Auth::user()->name }} <span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="{{url('/user')}}">用户中心</a></li>
                            <li class="divider"></li>
                            @if(Auth::user()->isAdmin())
                                <li><a href="{{url('/admin')}}">后台管理</a></li>
                                <li class="divider"></li>
                            @endif
                            <li><a href="{{ url('/account/logout') }}">退出</a></li>
                        </ul>
                    </li>
                @endif
            </ul>
        </div>
    </div>
</nav>
<!--[if lt IE 9]>
<script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="{{ asset('/static/js/jquery-1.11.3.min.js') }}"></script>
<script src="{{ asset('/static/vendor/bootstrap/js/bootstrap.min.js') }}"></script>
<script src="{{ asset('/static/vendor/bootstrap-select/js/bootstrap-select.min.js') }}"></script>
<script src="{{ asset('/static/vendor/bootstrap-select/js/i18n/defaults-zh_CN.min.js') }}"></script>
<script src="{{ asset('/static/vendor/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js') }}"></script>
<script src="{{ asset('/static/vendor/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js') }}"></script>
<script src="{{ asset('/static/vendor/bootstrap-fileinput/js/fileinput.min.js') }}"></script>
<script src="{{ asset('/static/vendor/bootstrap-fileinput/js/fileinput_locale_zh.js') }}"></script>

<script src="{{ asset('/static/js/index/app.js') }}"></script>
<div class="container">
    @if (count($errors) > 0)
        <div class="alert alert-danger">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <strong>错误：</strong><br><br>
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif
    @if(session('message'))
        <div class="alert alert-info">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            {{ session('message') }}
        </div>
    @endif
    @yield('navbar')
    @yield('content')
</div>
<hr>
<footer style="margin:15px 0;">
    <div class="container">
        <div class="col-lg-2">
            <img src="{{asset('static/images/logo.png')}}" style="width:166px;height:66px;"/>
        </div>
        <div style="margin-top:25px;">
            <div class="col-sm-1"><a href="{{url('about')}}"><h5>关于我们</h5></a></div>
            <div class="col-sm-1"><a href="{{url('about/advert')}}"><h5>广告合作</h5></a></div>
            <div class="col-sm-1"><a href="{{url('about/links')}}"><h5>友情链接</h5></a></div>
        </div>
    </div>
</footer>
</body>
</html>